<template>
  <el-popover
    v-model="showDelet"
    trigger="manual"
  >
    <p>是否{{ label }}?</p>
    <div style="text-align: right; margin: 0">
      <el-button
        size="mini"
        type="text"
        @click="confirm('cancel',id)"
      >
        取消
      </el-button>
      <el-button
        type="primary"
        size="mini"
        @click="confirm('confirm',id)"
      >
        确定
      </el-button>
    </div>
    <span slot="reference">
      <slot>默认插槽</slot>
    </span>
  </el-popover>
</template>

<script lang='ts'>
import { Component, Vue, Prop, Emit } from 'vue-property-decorator'
@Component({
})
export default class Page extends Vue {
  @Prop() showDelet !: boolean
  @Prop({ default: '删除' }) label !: string
  @Prop() id !: boolean
  @Emit()
  confirm(type: string, id:number) {
  }
}
</script>

<style lang='scss' scoped>
</style>
